package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 单据规则对象 sys_serial_rule
 * 
 * @author huikai
 * @date 2025-03-13
 */
public class SysSerialRule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 规则ID */
    private Long ruleId;

    /** 规则编码 */
    @Excel(name = "规则编码")
    private String ruleCode;

    /** 规则名称 */
    @Excel(name = "规则名称")
    private String ruleName;

    /** 固定前缀 */
    @Excel(name = "固定前缀")
    private String prefix;

    /** 日期格式 */
    @Excel(name = "日期格式")
    private String dateFormat;

    /** 序列号长度 */
    @Excel(name = "序列号长度")
    private Integer seqLength;

    /** 当前日期 */
    @Excel(name = "当前日期")
    private String currentDateStr;

    /** 当前序列号 */
    @Excel(name = "当前序列号")
    private Long currentSeq;

    /** 上次重置时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上次重置时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastResetTime;

    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }

    public void setRuleCode(String ruleCode) 
    {
        this.ruleCode = ruleCode;
    }

    public String getRuleCode() 
    {
        return ruleCode;
    }

    public void setRuleName(String ruleName) 
    {
        this.ruleName = ruleName;
    }

    public String getRuleName() 
    {
        return ruleName;
    }

    public void setPrefix(String prefix) 
    {
        this.prefix = prefix;
    }

    public String getPrefix() 
    {
        return prefix;
    }

    public void setDateFormat(String dateFormat) 
    {
        this.dateFormat = dateFormat;
    }

    public String getDateFormat() 
    {
        return dateFormat;
    }

    public void setSeqLength(Integer seqLength)
    {
        this.seqLength = seqLength;
    }

    public Integer getSeqLength()
    {
        return seqLength;
    }

    public void setCurrentSeq(Long currentSeq) 
    {
        this.currentSeq = currentSeq;
    }

    public Long getCurrentSeq() 
    {
        return currentSeq;
    }

    public void setLastResetTime(Date lastResetTime) 
    {
        this.lastResetTime = lastResetTime;
    }

    public Date getLastResetTime() 
    {
        return lastResetTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ruleId", getRuleId())
            .append("ruleCode", getRuleCode())
            .append("ruleName", getRuleName())
            .append("prefix", getPrefix())
            .append("dateFormat", getDateFormat())
            .append("seqLength", getSeqLength())
            .append("currentDateStr", getCurrentDateStr())
            .append("currentSeq", getCurrentSeq())
            .append("lastResetTime", getLastResetTime())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }

    public String getCurrentDateStr() {
        return currentDateStr;
    }

    public void setCurrentDateStr(String currentDateStr) {
        this.currentDateStr = currentDateStr;
    }
}
